import pandas as pd
import numpy as np

a = pd.Series(np.arange(1000), index=pd.date_range("2024-01-01", periods=1000))

print(a)
print(a.index)
print(a["2024-03"])
print(a["2024"])
print(a["2024": "2025-01"])
print(a.resample("w").sum())
print(a.resample("M").sum())
print(a.resample("M").mean())

print(a.truncate(before="2024-04"))
print(a.truncate(after="2024-04"))
